Optimal. Leaf size=160 \[ -\frac{\left (A-\sqrt{a} B\right ) \log \left (-\sqrt{3} \sqrt [4]{a} x+\sqrt{a}+x^2\right )}{4 \sqrt{3} a^{3/4}}+\frac{\left (A-\sqrt{a} B\right ) \log \left (\sqrt{3} \sqrt [4]{a} x+\sqrt{a}+x^2\right )}{4 \sqrt{3} a^{3/4}}-\frac{\left (\sqrt{a} B+A\right ) \tan ^{-1}\left (\sqrt{3}-\frac{2 x}{\sqrt [4]{a}}\right )}{2 a^{3/4}}+\frac{\left (\sqrt{a} B+A\right ) \tan ^{-1}\left (\frac{2 x}{\sqrt [4]{a}}+\sqrt{3}\right )}{2 a^{3/4}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.116336, antiderivative size = 160, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 5, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2, Rules used = {1169, 634, 617, 204, 628} \[ -\frac{\left (A-\sqrt{a} B\right ) \log \left (-\sqrt{3} \sqrt [4]{a} x+\sqrt{a}+x^2\right )}{4 \sqrt{3} a^{3/4}}+\frac{\left (A-\sqrt{a} B\right ) \log \left (\sqrt{3} \sqrt [4]{a} x+\sqrt{a}+x^2\right )}{4 \sqrt{3} a^{3/4}}-\frac{\left (\sqrt{a} B+A\right ) \tan ^{-1}\left (\sqrt{3}-\frac{2 x}{\sqrt [4]{a}}\right )}{2 a^{3/4}}+\frac{\left (\sqrt{a} B+A\right ) \tan ^{-1}\left (\frac{2 x}{\sqrt [4]{a}}+\sqrt{3}\right )}{2 a^{3/4}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1169
Rule 634
Rule 617
Rule 204
Rule 628
Rubi steps
\begin{align*} \int \frac{A+B x^2}{a-\sqrt{a} x^2+x^4} \, dx &=\frac{\int \frac{\sqrt{3} \sqrt [4]{a} A-\left (A-\sqrt{a} B\right ) x}{\sqrt{a}-\sqrt{3} \sqrt [4]{a} x+x^2} \, dx}{2 \sqrt{3} a^{3/4}}+\frac{\int \frac{\sqrt{3} \sqrt [4]{a} A+\left (A-\sqrt{a} B\right ) x}{\sqrt{a}+\sqrt{3} \sqrt [4]{a} x+x^2} \, dx}{2 \sqrt{3} a^{3/4}}\\ &=\frac{1}{4} \left (\frac{A}{\sqrt{a}}+B\right ) \int \frac{1}{\sqrt{a}-\sqrt{3} \sqrt [4]{a} x+x^2} \, dx+\frac{1}{4} \left (\frac{A}{\sqrt{a}}+B\right ) \int \frac{1}{\sqrt{a}+\sqrt{3} \sqrt [4]{a} x+x^2} \, dx-\frac{\left (A-\sqrt{a} B\right ) \int \frac{-\sqrt{3} \sqrt [4]{a}+2 x}{\sqrt{a}-\sqrt{3} \sqrt [4]{a} x+x^2} \, dx}{4 \sqrt{3} a^{3/4}}+\frac{\left (A-\sqrt{a} B\right ) \int \frac{\sqrt{3} \sqrt [4]{a}+2 x}{\sqrt{a}+\sqrt{3} \sqrt [4]{a} x+x^2} \, dx}{4 \sqrt{3} a^{3/4}}\\ &=-\frac{\left (A-\sqrt{a} B\right ) \log \left (\sqrt{a}-\sqrt{3} \sqrt [4]{a} x+x^2\right )}{4 \sqrt{3} a^{3/4}}+\frac{\left (A-\sqrt{a} B\right ) \log \left (\sqrt{a}+\sqrt{3} \sqrt [4]{a} x+x^2\right )}{4 \sqrt{3} a^{3/4}}+\frac{\left (A+\sqrt{a} B\right ) \operatorname{Subst}\left (\int \frac{1}{-\frac{1}{3}-x^2} \, dx,x,1-\frac{2 x}{\sqrt{3} \sqrt [4]{a}}\right )}{2 \sqrt{3} a^{3/4}}-\frac{\left (A+\sqrt{a} B\right ) \operatorname{Subst}\left (\int \frac{1}{-\frac{1}{3}-x^2} \, dx,x,1+\frac{2 x}{\sqrt{3} \sqrt [4]{a}}\right )}{2 \sqrt{3} a^{3/4}}\\ &=-\frac{\left (A+\sqrt{a} B\right ) \tan ^{-1}\left (\sqrt{3}-\frac{2 x}{\sqrt [4]{a}}\right )}{2 a^{3/4}}+\frac{\left (A+\sqrt{a} B\right ) \tan ^{-1}\left (\sqrt{3}+\frac{2 x}{\sqrt [4]{a}}\right )}{2 a^{3/4}}-\frac{\left (A-\sqrt{a} B\right ) \log \left (\sqrt{a}-\sqrt{3} \sqrt [4]{a} x+x^2\right )}{4 \sqrt{3} a^{3/4}}+\frac{\left (A-\sqrt{a} B\right ) \log \left (\sqrt{a}+\sqrt{3} \sqrt [4]{a} x+x^2\right )}{4 \sqrt{3} a^{3/4}}\\ \end{align*}
Mathematica [C] time = 0.136933, size = 138, normalized size = 0.86 \[ \frac{\sqrt [4]{-1} \left (\frac{\left (\left (\sqrt{3}-i\right ) \sqrt{a} B-2 i A\right ) \tan ^{-1}\left (\frac{(1+i) x}{\sqrt{\sqrt{3}-i} \sqrt [4]{a}}\right )}{\sqrt{\sqrt{3}-i}}-\frac{\left (\left (\sqrt{3}+i\right ) \sqrt{a} B+2 i A\right ) \tanh ^{-1}\left (\frac{(1+i) x}{\sqrt{\sqrt{3}+i} \sqrt [4]{a}}\right )}{\sqrt{\sqrt{3}+i}}\right )}{\sqrt{6} a^{3/4}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.097, size = 194, normalized size = 1.2 \begin{align*}{\frac{A\sqrt{3}}{12}\ln \left ({x}^{2}+\sqrt [4]{a}x\sqrt{3}+\sqrt{a} \right ){a}^{-{\frac{3}{4}}}}-{\frac{B\sqrt{3}}{12}\ln \left ({x}^{2}+\sqrt [4]{a}x\sqrt{3}+\sqrt{a} \right ){\frac{1}{\sqrt [4]{a}}}}+{\frac{A}{2}\arctan \left ({ \left ( 2\,x+\sqrt{3}\sqrt [4]{a} \right ){\frac{1}{\sqrt [4]{a}}}} \right ){a}^{-{\frac{3}{4}}}}+{\frac{B}{2}\arctan \left ({ \left ( 2\,x+\sqrt{3}\sqrt [4]{a} \right ){\frac{1}{\sqrt [4]{a}}}} \right ){\frac{1}{\sqrt [4]{a}}}}-{\frac{A\sqrt{3}}{12}\ln \left ({x}^{2}-\sqrt [4]{a}x\sqrt{3}+\sqrt{a} \right ){a}^{-{\frac{3}{4}}}}+{\frac{B\sqrt{3}}{12}\ln \left ({x}^{2}-\sqrt [4]{a}x\sqrt{3}+\sqrt{a} \right ){\frac{1}{\sqrt [4]{a}}}}+{\frac{A}{2}\arctan \left ({ \left ( 2\,x-\sqrt{3}\sqrt [4]{a} \right ){\frac{1}{\sqrt [4]{a}}}} \right ){a}^{-{\frac{3}{4}}}}+{\frac{B}{2}\arctan \left ({ \left ( 2\,x-\sqrt{3}\sqrt [4]{a} \right ){\frac{1}{\sqrt [4]{a}}}} \right ){\frac{1}{\sqrt [4]{a}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{B x^{2} + A}{x^{4} - \sqrt{a} x^{2} + a}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.4112, size = 2531, normalized size = 15.82 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: PolynomialError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: TypeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]